import CommonHeader from '@/components/common-header/index'
import GetVisitingClockList from '@/apis/GetVisitingClockList'

export default {
  name: 'VisitingList',
  components: {
    CommonHeader,
  },
  data() {
    return {
      visitingList: [],
      signShow: false,
    }
  },
  mounted() {
    /**
     * 查询外勤打卡记录
     */
    GetVisitingClockList(
      {
        jobNumber: '2101',
      },
      this.$store.state.authorization
    ).then((res) => {
      this.visitingList = res.data.data
      // console.log(this.visitingList)
      if (this.visitingList.length === 0) {
        this.signShow = true
      } else {
        this.signShow = false
      }
    })
  },
}
